{% extends "header.html" %}
{% block css %}
<style>
  .index_abs_img{
    width: 620px;
  }
</style>
{% endblock %}
{% block title %}
<title>首页</title>
{% endblock %}
{% block body %}
<div class="row col-md-4 col-md-offset-4">



<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!--  按钮-->
  <!-- Indicators -->
  <ol class="carousel-indicators">
    {% for abs in abss %}
    {% if forloop.first %}
    <li data-target="#carousel-example-generic" data-slide-to="{{ forloop.counter0 }}" class="active"></li>
    {% else %}
    <li data-target="#carousel-example-generic" data-slide-to="{{ forloop.counter0 }}"></li>
    {% endif %}
    {% endfor %}
  </ol>

<!--  轮播图-->
  <!-- Wrapper for slides -->

  <div class="carousel-inner" role="listbox">
    {% for abs in abss %}
    {% if forloop.first %}
     <div class="item active">
    {% else %}
    <div class="item">

    {% endif %}
    <img src="/media/{{ abs.img }}"  class="index_abs_img">

    </div>
    {% endfor %}

  </div>

  <!-- Controls -->
  <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>

</div>

{% endblock %}
